package com.tfw.domain;



import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Objects;

/**
 * @program: fruit-sale
 * @description: 顾客
 * @author: Fuwen
 * @create: 2022-07-27 20:58
 **/
public class People {
    /**
     * 唯一id
     */
    private String uuid;
    /**
     * 手机号
     */
    private String phoneNum;
    /**
     * 购物车
     */
    private List<Good> goods;

    public void buy(Good good,int count){
        Good buy = good.buy(count);
        if (this.goods==null||this.goods.size()==0){
            this.goods=new ArrayList<>();
        }
        this.goods.add(buy);
    }

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public String getPhoneNum() {
        return phoneNum;
    }

    public void setPhoneNum(String phoneNum) {
        this.phoneNum = phoneNum;
    }

    public List<Good> getGoods() {
        return goods;
    }

    public void setGoods(List<Good> goods) {
        this.goods = goods;
    }
}
